<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var str1 = '01';
    var str2 = '1.1';
    var str3 = 'string';
    var b = false;
    var o = {
      valueOf () {
        return -1;
      }
    }

    console.log(+ str1);
    console.log(+ str2);
    console.log(+ str3);
    console.log(+ b);
    console.log(+ o);

    console.log(- str1);
    console.log(- str2);
    console.log(- str3);
    console.log(- b);
    console.log(- o);
  </script>
</body>
</html>